package category.service.impl;

import java.util.List;
import org.springframework.stereotype.Service;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.github.pagehelper.PageInfo;
import com.aidex.common.core.domain.BaseEntity;
import com.aidex.common.core.service.BaseServiceImpl;
import category.mapper.BCategoryMapper;
import category.domain.BCategory;
import category.service.BCategoryService;
import org.springframework.transaction.annotation.Transactional;

/**
 * 商品类目表Service业务层处理
 * @author 1205560870@qq.com
 * @email 1205560870@qq.com
 * @date 2025-03-10
 */
@Service
@Transactional(readOnly = true)
public class BCategoryServiceImpl extends BaseServiceImpl<BCategoryMapper, BCategory> implements BCategoryService {

    private static final Logger log = LoggerFactory.getLogger(BCategoryServiceImpl.class);

    /**
     * 获取单条数据
     * @param bCategory 商品类目表
     * @return 商品类目表
     */
    @Override
    public BCategory get(BCategory bCategory) {
        BCategory dto = super.get(bCategory);
        return dto;
    }

    /**
     * 获取单条数据
     * @param id 商品类目表id
     * @return 商品类目表
     */
    @Override
    public BCategory get(String id) {
        BCategory dto = super.get(id);
        return dto;
    }

    /**
     * 查询商品类目表列表
     * @param bCategory 商品类目表
     * @return 商品类目表
     */
    @Override
    public List<BCategory> findList(BCategory bCategory) {
		List<BCategory> bCategoryList = super.findList(bCategory);
        return bCategoryList;
    }

    /**
     * 分页查询商品类目表列表
     * @param bCategory 商品类目表
     * @return 商品类目表
     */
    @Override
    public PageInfo<BCategory> findPage(BCategory bCategory) {
		PageInfo<BCategory> page = super.findPage(bCategory);
        return page;
    }

    /**
     * 保存商品类目表
     * @param bCategory
     * @return 结果
     */
    @Override
    public boolean save(BCategory bCategory) {
        return super.save(bCategory);
    }

    /**
     * 删除商品类目表信息
     * @param bCategory
     * @return 结果
     */
    @Override
    public boolean remove(BCategory bCategory) {
        return super.remove(bCategory);
    }

    /**
     * 批量删除商品类目表
     * @param ids 需要删除的商品类目表ID
     * @return 结果
     */
    @Transactional(readOnly = false)
    @Override
    public int deleteBCategoryByIds(String[] ids) {
        return mapper.deleteBCategoryByIds(ids, BaseEntity.DEL_FLAG_DELETE);
    }

}
